package com.jgp.security.props;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2018/8/7
 */
@Component
@ConfigurationProperties(prefix = "jgp.security", ignoreUnknownFields = false)
public class SecurityConfigPropBean {
    /**
     * 是否启用安全
     */
    private Boolean enabled;
    
    /**
     * 是否启用独立数据源
     */
    private Boolean dbEnabled = false;
    /**
     * 数据源url
     */
    private String dbUrl;
    /**
     * 数据源账号
     */
    private String dbUsername;
    /**
     * 数据源密码
     */
    private String dbPassword;
    
    /**
     * 是否为开发模式
     */
    private Boolean devMode = false;
    
    /**
     * 客户端ID
     */
    private String clientId;
    
    /**
     * 类型 shiro spring
     */
    private String type;
    /**
     * 超级管理员账号密码 以逗号分隔 admin,123456
     */
    private String superAdmin;
    /**
     * 加入安全控制 多个以逗号分隔 例如 /sys/**,/mobile/**
     */
    private String[] includes;
    /**
     * 将URL从安全控制中排除 多个以逗号分隔 例如 /sys/**,/mobile/**
     */
    private String[] excludes;
    /**
     * 加入token验证 比如给移动端用的接口需要加到这里面
     * 请求头中需要带着 x-auth-token
     */
    private String[] tokenCheckIncludes;
    /**
     * 登录成功跳转页面
     */
    private String successEntry;
    /**
     * 登录认证发送短信验证码的模板
     */
    private String smsValidTpl;
    /**
     * 是否在控制台打印发送的验证码
     */
    private Boolean showSmsCode = false;
    
    /**
     * 启动用户扩展信息维护
     */
    private Boolean enabledUserExt = false;
    
    /**
     * 启动机构扩展信息维护
     */
    private Boolean enabledInstitutionExt = false;
    
    /**
     * 用户详细自定义表单表示
     */
    private String userExtFormCode;
    
    /**
     * 组织机构详细自定义表单表示
     */
    private String institutionExtFormCode;
    
    private Boolean verify = false;
    
    public Boolean getEnabled() {
        return enabled;
    }
    
    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }
    
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
    
    public String getSuperAdmin() {
        return superAdmin;
    }
    
    public void setSuperAdmin(String superAdmin) {
        this.superAdmin = superAdmin;
    }
    
    public String[] getIncludes() {
        return includes;
    }
    
    public void setIncludes(String[] includes) {
        this.includes = includes;
    }
    
    public String[] getExcludes() {
        return excludes;
    }
    
    public void setExcludes(String[] excludes) {
        this.excludes = excludes;
    }
    
    public String[] getTokenCheckIncludes() {
        return tokenCheckIncludes;
    }
    
    public void setTokenCheckIncludes(String[] tokenCheckIncludes) {
        this.tokenCheckIncludes = tokenCheckIncludes;
    }
    
    public String getSuccessEntry() {
        return successEntry;
    }
    
    public void setSuccessEntry(String successEntry) {
        this.successEntry = successEntry;
    }
    
    public String getSmsValidTpl() {
        return smsValidTpl;
    }
    
    public void setSmsValidTpl(String smsValidTpl) {
        this.smsValidTpl = smsValidTpl;
    }
    
    public Boolean getShowSmsCode() {
        return showSmsCode;
    }
    
    public void setShowSmsCode(Boolean showSmsCode) {
        this.showSmsCode = showSmsCode;
    }
    
    public Boolean getEnabledUserExt() {
        return enabledUserExt;
    }
    
    public void setEnabledUserExt(Boolean enabledUserExt) {
        this.enabledUserExt = enabledUserExt;
    }
    
    public Boolean getEnabledInstitutionExt() {
        return enabledInstitutionExt;
    }
    
    public void setEnabledInstitutionExt(Boolean enabledInstitutionExt) {
        this.enabledInstitutionExt = enabledInstitutionExt;
    }
    
    public String getUserExtFormCode() {
        return userExtFormCode;
    }
    
    public void setUserExtFormCode(String userExtFormCode) {
        this.userExtFormCode = userExtFormCode;
    }
    
    public String getInstitutionExtFormCode() {
        return institutionExtFormCode;
    }
    
    public void setInstitutionExtFormCode(String institutionExtFormCode) {
        this.institutionExtFormCode = institutionExtFormCode;
    }
    
    public Boolean getDevMode() {
        return devMode;
    }
    
    public void setDevMode(Boolean devMode) {
        this.devMode = devMode;
    }
    
    public Boolean getDbEnabled() {
        return dbEnabled;
    }
    
    public void setDbEnabled(Boolean dbEnabled) {
        this.dbEnabled = dbEnabled;
    }
    
    public String getDbUrl() {
        return dbUrl;
    }
    
    public void setDbUrl(String dbUrl) {
        this.dbUrl = dbUrl;
    }
    
    public String getDbUsername() {
        return dbUsername;
    }
    
    public void setDbUsername(String dbUsername) {
        this.dbUsername = dbUsername;
    }
    
    public String getDbPassword() {
        return dbPassword;
    }
    
    public void setDbPassword(String dbPassword) {
        this.dbPassword = dbPassword;
    }
    
    public String getClientId() {
        return clientId;
    }
    
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    
    public Boolean getVerify() {
        return verify;
    }
    
    public void setVerify(Boolean verify) {
        this.verify = verify;
    }
}
